﻿using EWGprint;
using HsPrint.Ut;
using ParkService;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Threading;
using System.Windows.Forms;

namespace HsPrint
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            int argsLength = args.Length;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //只允许启动一个当前程序
            Mutex mutex = new Mutex(false, "CardService");
            bool running = !mutex.WaitOne(0, false);
            if (running)
            {
                MessageBox.Show("读卡服务已启动！", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            FrmMain frm = new FrmMain();
            frm.InitSvr();
            Application.Run(frm);
        }
    }
}
